package com.icloud.article.boot.dto;

import com.icloud.article.boot.model.Attachment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@ApiModel("附件dto")
@Data
public class AttachmentDto {

    @ApiModelProperty("视频封面地址")
    private String cover;

    @ApiModelProperty("图片或视频地址")
    private String url;

    @ApiModelProperty("文件后缀，如png")
    private String postfix;

    public AttachmentDto() {
    }

    public AttachmentDto(Attachment attachment) {
        this.url = attachment.getUrl();
        this.postfix = attachment.getPostfix();
        this.cover = attachment.getCover();
    }
}
